package com.newtouch.bxzs.common.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 附件信息表
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021年1月4日</td>
 * <td>Amour</td>
 * <td>Create</td>
 * </tr>
 * </table>
 * 
 * @author Amour
 * 
 * @version 1.0.0
 * @since 1.0.0
 */
@Data
@TableName(value = "ASSISTANT_ATTACHMENT")
public class Attachment implements Serializable {

	/** serialVersionUID */
	private static final long serialVersionUID = 2823919189396880126L;

	/** 主键 uuid */
	@TableId(value = "ATTACHMENT_ID", type = IdType.ASSIGN_UUID)
	private String attachmentId;

	/** 创建人id */
	@TableField(value = "CREATE_USER_ID")
	private String createUserId;

	/** 创建时间 */
	@TableField(value = "CREATE_TIME")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/** 修改人id */
	@TableField(value = "UPDATE_USER_ID")
	private String updateUserId;

	/** 修改时间 */
	@TableField(value = "UPDATE_TIME")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;

	/** 附件名称 */
	@TableField(value = "ATTACHMENT_NAME")
	private String attachmentName;

	/** 附件路径 */
	@TableField(value = "ATTACHMENT_URL")
	private String attachmentUrl;

	/** 附件类型 */
	@TableField(value = "ATTACHMENT_TYPE")
	private String attachmentType;

	/** 附件关联ID */
	@TableField(value = "ATTACHMENT_RELATION_ID")
	private String attachmentRelationId;

	/**
	 * 默认构造方法
	 * 
	 * @param createId
	 *            创建人id
	 * @param modifierId
	 *            修改人id
	 * @param attachmentName
	 *            附件名称
	 * @param attachmentUrl
	 *            附件地址
	 * @param attachmentType
	 *            附件类型
	 * @param attachmentRelationId
	 *            关联id
	 */
	public Attachment(String createId, String modifierId, String attachmentName, String attachmentUrl,
			String attachmentType, String attachmentRelationId) {
		super();
		this.createUserId = createId;
		this.createTime = new Date();
		this.updateUserId = modifierId;
		this.updateTime = new Date();
		this.attachmentName = attachmentName;
		this.attachmentUrl = attachmentUrl;
		this.attachmentType = attachmentType;
		this.attachmentRelationId = attachmentRelationId;
	}

	/**
	 * 
	 * 默认构造方法
	 */
	public Attachment() {
		super();
	}

}
